package org.zfes.snowier.zbss.xzy;

import java.io.File;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;

import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.api.ProgressCallback;
import org.mybatis.generator.api.VerboseProgressCallback;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
//import org.zfes.snowier.cloud.zbss.datav.generator.BatisGenerator;
import org.zfes.snowier.generate.GenMain;

public class CodeGenMain{

	static String project_path="D:\\workspace\\flux-snowier-zbss-device\\flux-snowier-zbss-device-service";
	static String mybatis_gen_configfile=project_path+"/src/main/resources/generatorConfig.xml";
	
    public static void main(String[] args) throws Exception {

	
    	//GenMain.doGen(project_path, mybatis_gen_configfile);
	//	gen2();
    
    }
//    static void gen2() {
//    	  try {
//       	   List<String> warnings = new ArrayList<String>();
//       	   boolean overwrite = true ;
//       	   File configFile = new File(mybatis_gen_configfile);
//       	   ConfigurationParser cp = new ConfigurationParser(warnings);
//       	   Configuration config = cp.parseConfiguration(configFile);
//       	   DefaultShellCallback callback = new DefaultShellCallback(overwrite);
//       	BatisGenerator myBatisGenerator = new BatisGenerator(config, callback, warnings);
//       	   ProgressCallback progressCallback = new VerboseProgressCallback();
//       	 
//       	   myBatisGenerator.generate(progressCallback);
//       	
//       	   System.out.println(warnings);
//       	   
//       	   System.out.println("代码成功生成!");
//       	   
//       } catch (Exception e) {
//           e.printStackTrace();
//       }
//    }
    
}
